
{template "header-huiyuan.html"}
{if  $_GET['m'] !='edit' && $_GET['tanchu'] !='1'}
{template "fanhui-index.html"}
{/if}
{php $tixianhao = \Phpcmf\Service::M()->db->table('1_quan_tixian_hao')->where('uid', $member.id)->countAllResults();}
{if $tixianhao == 0 || $_GET['m'] =='edit'}
<div class="d-container">
	<div class="d-row">
		<div class="col-md-6 col-md-offset-3  d-yuanjiao-20">
			<div class="row">
				<div class="d-yuanjiao-10 d-kuan d-bianhua-20 ">
					<div class="portlet light ">
					    <div class="portlet-title">
					        <div class="caption">
					            <span class="caption-subject"> 提现账号</span>
					        </div>
					    </div>
					    <div class="portlet-body form fc-form">
					        <form action="" class="form-horizontal" method="post" name="myform" id="myform">
					            {$form}
								{if $_GET['m'] !='edit'}
								<input type="hidden" name="data[uid]" id="dr_uid" value="{$member.id}" />
								{else}
								
								{/if}
								
					            
					            <div class="form-group" id="dr_row_password">
					                <label class="col-md-12 "> 账号类型 </label>
					                <div class="col-md-12">
					                    <?php echo dr_fieldform('{"name":"账号类型","fieldname":"leixing","ismain":"1","fieldtype":"Radio","setting":{"option":{"options":"微信|1\r\n支付宝|2","is_field_ld":"0","value":"","fieldtype":"","fieldlength":"","show_type":"0","css":""},"validate":{"required":"0","pattern":"","errortips":"","check":"","filter":"","formattr":"","tips":""}},"ismember":"1"}', $data['leixing'], 1, 1);?>
									</div>
					            </div>
					            
					            <div class="form-group" id="dr_row_password2">
					                <label class="col-md-12 "> 提现账号名称 </label>
					                <div class="col-md-12">
					                    <?php echo dr_fieldform('{"name":"提现账号名称","fieldname":"tixianming","ismain":"1","fieldtype":"Text","setting":{"option":{"fieldtype":"VARCHAR","fieldlength":"255","value":"","width":"100%","css":""},"validate":{"required":"1","pattern":"","errortips":"输入账号名称","check":"","filter":"","formattr":"","tips":""}},"ismember":"1"}', $data['tixianming'], 1, 1);?>
									</div>
					            </div>
					            <div class="form-group" id="dr_row_password3">
					                <label class="col-md-12 "> 提现账号 </label>
					                <div class="col-md-12">
					                    <?php echo dr_fieldform('{"name":"提现账号","fieldname":"tixianhao","ismain":"1","fieldtype":"Text","setting":{"option":{"fieldtype":"VARCHAR","fieldlength":"255","value":"","width":"100%","css":""},"validate":{"required":"1","pattern":"","errortips":"输入账号名称","check":"","filter":"","formattr":"","tips":""}},"ismember":"1"}', $data['tixianhao'], 1, 1);?>
									</div>
					            </div>
								<div class="form-group" id="dr_row_password3">
								    <label class="col-md-12 "> 收款二维码 </label>
								    <div class="col-md-12">
								        <?php echo dr_fieldform('{"name":"提现二维码","fieldname":"erweima","ismain":"1","fieldtype":"File","setting":{"option":{"fieldtype":"","fieldlength":"","ext":"jpg,gif,png","size":"30","attachment":"0","image_reduce":"1000","is_ext_tips":"0","css":""},"validate":{"required":"1","pattern":"","errortips":"请上传二维码","check":"","filter":"","formattr":"","tips":""}},"ismember":"1"}', $data['erweima'], 1, 1);?>
								    </div>
								</div>
								{if $_GET['tanchu'] !='1'}
					            <div class="form-actions fc-form-actions">
					                <label class="col-md-12 control-label">  </label>
					                <div class="col-md-12 fc-form-submit"><!--$reply_url-->{php $url= dr_member_url('pay/tixianhao/add');}
					                    <button type="button" onclick="dr_ajax_submit('{dr_now_url()}', 'myform', '2000', '{$url}')" class="btn blue d-kuan">  {dr_lang('保存')}</button>
									</div>
									
					
					            </div>
								{/if}
					        </form>
					    </div>
					</div>
				</div>
				
			</div>
		</div>
	</div>
</div>
{/if}
{if $_GET['m'] !='edit'}
<div class="d-container">
	<div class="d-row">
		<div class="col-md-6 col-md-offset-3  d-yuanjiao-20">
			<div class="row">
				<div class="d-yuanjiao-10 d-kuan d-bianhua-20 ">
					
					<!--div class="d-waigao-20 d-yuanjiao-20 d-kuan d-jiacu d-wenzi-16 d-zitiyanse-hui">
						软件
					</div-->
					<div id="content_list">
						{php $where=urlencode("(value>0)");}
						{table table=1_quan_tixian_hao uid=$member.id order=inputtime page=1 pagesize=10 return=tt}
						
							
							<!--列表重复-->
							<div class="d-yuanjiao-10 d-kuan d-waigao-20 d-beijing-baise d-bianhua-10">
								<!--头部-->
								<div class="d-kuan d-buhuanhang">
									<!--头部-->
									<div class="d-yuanjiao-10">
										<img src="{HOME_THEME_PATH}quan/img/zhifu{$tt.leixing}.png" width="40" height="40" class="d-yuanjiao-50"/>
										
									</div>
									<div class="d-zuo-10 d-kuan">
										<div class="d-jiacu d-buhuanhang">
											<div class="d-jiacu d-quxian-0">
												提现账号名:{$tt.tixianming}
											</div>
										</div>
										<div class="d-zitiyanse-hui ">
											提现账号:{$tt.tixianhao} 
										</div>
										{dr_date($tt.inputtime)}
									</div>
									<!--已阅-->
									<div class="d-kuan-130">
										<div class="d-zuo-10 d-div-you d-buhuanhang d-shang-10">
											<a onclick="javascript:dr_xiugai({$tt.id});">修改</a>
										</div>
						
									</div>
									<!--已阅-->
								</div>
								
								
							</div>
						
						{/table}
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
{/if}
<style>
	.input-large {
	    width: 100%!important;
	}
	.form-horizontal .form-group {
	    margin-left: -5px;
	    margin-right: -5px;
	}
	.form-control {
	    width: 100%;
	    height: 45px;
	    padding: 6px 12px;
	    background-color: #f3f4f7;
	    border: 1px solid #f3f4f7;
	    -webkit-box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%);
	    -webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
	    -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
	    transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
	}
</style>
<script>
	function dr_xiugai(id){
		dr_iframe("修改账号", "{dr_member_url('pay/tixianhao/edit')}&id="+id, '100%', '100%');
	}
	$(document).ready(function() {  
	    $('.password-input').on('input', function() {  
	            var $this = $(this);  
	            var password = $this.val();
				
	            var errorId = $this.attr('id') + '_error';  
	            
	            // 使用正则表达式检查密码是否只包含数字（可选）  
	            var regex = /^\d{1,6}$/; // 匹配1到6个数字的正则表达式 
				var shuru = regex.test(password);
				this.value = this.value.replace(/[^\d]/g, '');
	            
				if (password.length > 6) {
				    // 如果密码长度超过6位，则截断到6位并显示错误消息（如果需要）  
				    $this.val(password.substring(0, 6));  
				    $('#' + errorId).text('密码不能超过6位');  
					console.log('errorId',errorId);
				}
				if(!regex.test(password)){
					$('#' + errorId).html('<span>密码为6为数字</span>'); 
				} else {
					if (password.length < 6) {
						$('#' + errorId).html('<span>支付密码为6位数字</span>');
					}
					if (password.length == 6) {
						$('#' + errorId).html('');
					}
				}
				
	        });    
	});
</script>
{template "fanhui.html"}
{template "mfooter.html"}
